<?php

class DrawingModel extends Model {
	
	function __construct() {
		parent::__construct();
	}
	
	function insertDrawing($post) {
		$this->db->insert('drawings', $post);
	}
	
	function getEmail($email) {
		$query = $this->db->getwhere('drawings', array('email' => $email));
		return $query;
	}
	
	function getToken($token) {
		$query = $this->db->getwhere('drawings', array('token' => $token));
		return $query;
	}
	
	function getAllEntries() {
		$query = $this->db->get('drawings');
		return $query;
	}
}

?>